package com.springboot.logback;

import com.springboot.logback.utils.ILogger;
import com.springboot.logback.utils.LoggerManager;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * Hello world!
 *
 */
@SpringBootApplication
public class AppFile
{
    //定义一个全局的记录器，通过LoggerFactory获取
    private static final ILogger logger = LoggerManager.getLogger(AppFile.class);

    public static void main(String[] args) {
        ConfigurableApplicationContext context = new SpringApplicationBuilder(AppFile.class)
                .web(WebApplicationType.SERVLET).run(args);
        logger.info("启动完成");
    }
}
